package com.zhengshan.demo.controller;

import com.zhengshan.demo.unit.SingleRedisUnits;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * todo
 *
 * @author zhengshan
 * @Date 2023/10/20 16:15
 */
@Controller
@RequestMapping(value = "/single/redis")
public class SingleRedisController {

    @Autowired
    private SingleRedisUnits singleRedisUnits;

    @RequestMapping("/product")
    @ResponseBody
    public void SingleRedisProductCon() {
        singleRedisUnits.SingleProducts();
    }


    @RequestMapping("/consumer")
    @ResponseBody
    public void SingleRedisConsumer() {
        singleRedisUnits.SingleConsumer();
    }
}
